The present application relates generally to an improved data processing apparatus and method and more specifically to mechanisms for error checking and correction for “Not AND” (NAND) flash devices.
Flash memory is an electronic non-volatile computer storage medium that can be electrically erased and reprogrammed. There are two main types of flash memory, which are named after the NAND and NOR logic gates, i.e. NAND flash memory and NOR flash memory. NAND type flash memory may be written and read in blocks (or pages) which are generally much smaller than the entire device. NOR type flash allows a single machine word (byte) to be written to an erased location, or read independently. The NAND type of flash memory is primarily used in main memory, memory cards, USB flash drives, solid-state drives or devices (SDDs), and similar products, for general storage and transfer of data. The NOR type, is used as a replacement for the older Erasable Programmable Read Only Memory (EPROM) devices and as an alternative to certain kinds of Read Only Memory (ROM) applications.
NAND flash architecture memory devices are accessed much like block devices, such as hard disks. Each block consists of a number of pages and associated with each page are a few bytes (typically 1/32 of the data size) that can be used for storage of an error correcting code (ECC) checksum. While reading and programming is performed on a page basis, erasure can only be performed on a block basis.
NAND devices rely on Error Correction Codes (ECCs) to compensate for bits that may spontaneously fail during normal device operation. If the ECC cannot correct the error during read, it may still detect the error. When doing erase or program operations, the device can detect blocks that fail to program or erase and mark them as “bad.” The data is then written to a different, “good” block, and a bad block map is updated.